home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1999 April
/
Macworld (1999-04).dmg
/
Shareware World
/
Comms & Internet
/
WebSentinel 2.0.5
/
Extras
/
Scripting
/
WebSiphon
/
sentinel_functions.t
< prev
Wrap
Text File
|
1998-03-18
|
4KB
|
110 lines
<<
// WebSentinel Scripting Functions
// Last modified: 3/18/98
// This is an include file for use by WebSiphon v1.5 users that wish to
// control WebSentinel through their templates.
// Full documentation for how to script WebSentinel is being worked on, and
// will be included in a future version of WebSentinel. Until that time, if
// you have questions feel free to email <websentinel-support@purity.com> or
// subscribe to the WebSentinel-Talk mailing list.
// count users
function sentinel_CountUsers (target_id)
return sendAppleEvent ("WebSentinel Gateway", "s_ec", "s_cu", [["s_tp" target_id]]);
end function;
// count groups
function sentinel_CountGroups (target_id)
return sendAppleEvent ("WebSentinel Gateway", "s_ec", "s_cg", [["----" target_id]]);
end function;
// get targets
function sentinel_GetTargets ()
return sendAppleEvent ("WebSentinel Gateway", "s_ec", "s_gt", []);
end function;
// get realms
function sentinel_GetRealms ()
return sendAppleEvent ("WebSentinel Gateway", "s_ec", "s_gr", []);
end function;
// get users
function sentinel_GetUsers (target_id, start_with, num_users)
return sendAppleEvent ("WebSentinel Gateway", "s_ec", "s_gu", [["s_tp" target_id] ["s_sw" start_with] ["s_nr" num_users]]);
end function;
// get groups
function sentinel_GetGroups (target_id, start_with, num_groups)
return sendAppleEvent ("WebSentinel Gateway", "s_ec", "s_gg", [["s_tp" target_id] ["s_sw" start_with] ["s_nr" num_groups]]);
end function;
// add realm
function sentinel_AddRealm (realm_name, match_string, grep, no_access_path, notes, label, target_id)
return sendAppleEvent ("WebSentinel Gateway", "s_ec", "s_ar", [["----" realm_name] ["s_mp" match_string]
["s_gp" grep] ["s_na" no_access_path] ["s_nt" notes] ["s_lp" label] ["s_tp" target_id]]);
end function;
// add user
function sentinel_AddUser (username, password, realms_list, groups_list, notes, label, target_id)
return sendAppleEvent ("WebSentinel Gateway", "s_ec", "s_au", [["----" username] ["s_pp" password]
["s_rl" realms_list] ["s_gr" groups_list] ["s_nt" notes] ["s_lp" label] ["s_tp" target_id]]);
end function;
// add group
function sentinel_AddGroup (groupname, realms_list, notes, label, target_id)
return sendAppleEvent ("WebSentinel Gateway", "s_ec", "s_au", [["----" groupname]
["s_rl" realms_list] ["s_nt" notes] ["s_lp" label] ["s_tp" target_id]]);
end function;
// set realm
function sentinel_SetRealm (realm_id, realm_name, match_string, grep, no_access_path, notes, label, target_id)
return sendAppleEvent ("WebSentinel Gateway", "s_ec", "s_sr", [["----" realm_id] ["s_np"] ["s_mp" match_string]
["s_gp" grep] ["s_na" no_access_path] ["s_nt" notes] ["s_lp" label] ["s_tp" target_id]]);
end function;
// set user
function sentinel_SetUser (user_id, username, password, realms_list, groups_list, notes, label, target_id)
return sendAppleEvent ("WebSentinel Gateway", "s_ec", "s_su", [["----" user_id] ["s_np" username] ["s_pp" password]
["s_rl" realms_list] ["s_gr" groups_list] ["s_nt" notes] ["s_lp" label] ["s_tp" target_id]]);
end function;
// set group
function sentinel_SetGroup (group_id, groupname, realms_list, notes, label, target_id)
return sendAppleEvent ("WebSentinel Gateway", "s_ec", "s_sg", [["----" group_id] ["s_np" groupname]
["s_rl" realms_list] ["s_nt" notes] ["s_lp" label] ["s_tp" target_id]]);
end function;
// remove realm
function sentinel_RemoveRealm (realm_id)
sendAppleEvent ("WebSentinel Gateway", "s_ec", "s_rr", [["----" realm_id]]);
end function;
// remove user
function sentinel_RemoveUser (user_id, target_id)
sendAppleEvent ("WebSentinel Gateway", "s_ec", "s_ru", [["----" user_id] ["s_tp" target_id]]);
end function;
// remove group
function sentinel_RemoveGroup (group_id, target_id)
sendAppleEvent ("WebSentinel Gateway", "s_ec", "s_rg", [["----" group_id] ["s_tp" target_id]]);
end function;
// lookup user
function sentinel_LookupUser (username, target_id)
return sendAppleEvent ("WebSentinel Gateway", "s_ec", "s_lu", [["----" username] ["s_tp" target_id]]);
end function;
>>